#pragma once

#include <d3dx10.h>

class Cube
{
public:
	Cube(ID3D10Device* pDevice);
	~Cube(void);

	HRESULT Initialize();
	void Render(D3DXMATRIX viewProj);
	void Update(float timeElapsed);
private:
	ID3D10Device*               pDevice;
	ID3D10Effect*               pEffect;
	ID3D10EffectTechnique*      pTechnique;
	ID3D10InputLayout*          pVertexLayout;
	ID3D10Buffer*               pVertexBuffer;
	ID3D10Buffer*               pIndexBuffer;
	ID3D10EffectMatrixVariable* pWorldVariable;
	ID3D10EffectMatrixVariable* pViewProjVariable;
	UINT stride;
	UINT offset;

	D3DXMATRIX                  World;

	HRESULT InitializeVertexLayout();
	HRESULT InitializeVertexBuffer();
	HRESULT InitializeIndexBuffer();
	HRESULT InitializeEffect();
};
